Understanding relations and functions